--[[

ShortKey Config File 2009.8.30

Author : simonw
From CWDG http://bbs.cwowaddon.com/thread-805-1-1.html

完成参数列表:

ShortKey.Config[index] = {
	Class = "[classname]",
	Character = "[palyername]",
	Race = "[racename]",
	Talent = 1 | 2 | nil,
	IsLoad = function
	{Key = "[keyname]", Type = "[type]", Value = "[value]",	Condition = "[cond]" | nil, Target = "[unit]" | nil, TargetFrames = "[framname1], [framname2], ..." | nil, Comment = "[comment]" | nil},
	...
}

通用参数说明: (所有参数均为字符串类型)
Group参数:
Class: 职业名称
Character: 角色名称
Race: 角色种族, 当职业,角色名称,种族都省略时默认为全局有效, 若有职业则载入职业配置, 若有角色则载入角色配置. 依赖配置顺序载入因此需要保证全局配置最前, 职业配置其次, 角色配置最后, 如果冲突后面的配置会覆盖前面的配置.
Talent: 双天赋选择参数, 整数1或者2
IsLoad: 默认为空使用系统条件函数, 可自定义条件函数, 返回true则载入此配置组.
Items:..

Item参数:
Key: 绑定的键盘或鼠标按键.
Type: 动作类型, 常用枚举值包含action,spell,item,marco,stop,target,focus,assist,menu,command
Value: 不同动作Type对应值不同.
Target: 通常为target,player,targettarget,focus,partyN,raidN...
Condition: 标准宏条件语法, 以方括号括起.
TargetFrames: 以逗号分隔开的窗体名字, 用于定义将鼠标按键绑定于之上的窗体, 可以是系统窗体也可以是用户自定义窗体.
Comment: 注释, 未来版本会有大用途.

-------------------------------- ShortKey 配置说明 --------------------------------

type = actionbar
action = "increment" | "decrement" | "[num]" | "[numN]:[numM]"

type = action
action = "[num]"

type = pet
action = "[num]"

type = spell
spell = "[spellname]"

type = item
...

type = macro
macro = "[num]" | "[macroname]" | macrotext
macrotext = "[macrobody]"

type = cancelaura

type = stop

type = target

type = focus

type = assist

type = maintank

type = mainassist

type = click

type = attribute

]]--

local PARTYMEMBERFRAMES = "PartyMemberFrame1,PartyMemberFrame2,PartyMemberFrame3,PartyMemberFrame4"


--command值的定义参见http://wiki.cwowaddon.com/BindingName
--group1
ShortKey.Config[1] = {
	Comment = "全局日常功能键配置",
	{Key = "W", Type = "command", Value = "MOVEFORWARD", Comment = "向前走"},
	{Key = "S", Type = "command", Value = "MOVEBACKWARD", Comment = "向后走"},
	{Key = "A", Type = "command", Value = "STRAFELEFT", Comment = "向左走"},
	{Key = "D", Type = "command", Value = "STRAFERIGHT", Comment = "右前走"},
	{Key = "B", Type = "command", Value = "OPENALLBAGS", Comment = "打开全部包"},
	{Key = "F5", Type = "command", Value = "TOGGLECHARACTER0", Comment = "角色信息面板"},
	{Key = "F6", Type = "command", Value = "TOGGLESPELLBOOK", Comment = "法术书和技能面板"},
	{Key = "F7", Type = "command", Value = "TOGGLETALENTS", Comment = "天赋面板"},
	{Key = "F8", Type = "command", Value = "TOGGLEQUESTLOG", Comment = "任务面板"},
	{Key = "F9", Type = "command", Value = "TOGGLESOCIAL", Comment = "社交面板"},
	{Key = "F10", Type = "command", Value = "TOGGLEWORLDMAP", Comment = "大地图面板"},
	{Key = "F11", Type = "command", Value = "TOGGLEBATTLEFIELDMINIMAP", Comment = "小地图面板"},
	{Key = "F12", Type = "command", Value = "TOGGLELFGPARENT", Comment = "寻求组队面板"},
	{Key = "ESCAPE", Type = "command", Value = "TOGGLEGAMEMENU", Comment = "游戏主菜单"},
}

--group2
ShortKey.Config[2] = {
	Class = "牧师",
	--Character = "民族英雄",
	--Race = "人类",
	--IsLoad
	Comment = "simonw的牧师通用配置",
	{Key = "E", Type = "spell", Value = "真言术：盾", Target = "player", Comment = "为自己加真言术盾"},
	{Key = "Q", Type = "macro", Value = "/castsequence [target=player] reset=2/combat 恢复,愈合祷言", Comment = "在正常形态下按一次为自己释放恢复,2秒内再次按下为自己释放愈合祷言"},
	{Key = "SHIFT-Q", Type = "item", Value = "厚灵纹布绷带", Target = "player", Comment = "为自己绑绷带"},
	{Key = "R", Type = "spell", Value = "快速治疗", Target = "player", Comment = "为自己快速治疗"},
	{Key = "ALT-R", Type = "spell", Value = "强效治疗术", Target = "player", Comment = "为自己强效治疗"},
	{Key = "F", Type = "spell", Value = "驱散魔法", Target = "player", Comment = "为自己驱散魔法"},
	{Key = "ALT-F", Type = "spell", Value = "驱除疾病", Target = "player", Comment = "为自己驱除疾病"},
	{Key = "X", Type = "spell", Value = "射击", Target = "target", Comment = "魔杖射击"},
	{Key = "ALT-X", Type = "spell", Value = "神圣新星", Comment = "神圣新星AOE"},
	{Key = "G", Type = "macro", Value = "/use [nocombat,outdoors,flyable] 迅捷紫色狮鹫;黑色战驹", Comment = "上下鸟马"},
	{Key = "F1", Type = "spell", Value = "暗言术：灭", Target = "target", Comment = "施放暗言术：灭"},

	{Key = "MOUSEWHEELUP", Type = "macro", Value = "/castsequence [target=player] reset=3/combat 心灵之火,防护暗影,真言术：韧,神圣之灵,防护恐惧结界", Comment = "连着施放所有Buff, 3秒重置"},

	{Key = "LeftButton", Type = "spell", Value = "快速治疗", TargetFrames = PARTYMEMBERFRAMES, Comment = "在小队头像上按鼠标左键会为该小队成员施放快速治疗法术"},
	{Key = "ALT-LeftButton", Type = "spell", Value = "强效治疗术", TargetFrames = PARTYMEMBERFRAMES},
	{Key = "CTRL-LeftButton", Type = "spell", Value = "联结治疗", TargetFrames = PARTYMEMBERFRAMES},
	{Key = "SHIFT-LeftButton", Type = "target", TargetFrames = PARTYMEMBERFRAMES, Comment = "在小队头像上按SHIFT+鼠标左键为选中该小队成员"},

	{Key = "RightButton", Type = "spell", Value = "真言术：盾", TargetFrames = PARTYMEMBERFRAMES},
	{Key = "ALT-RightButton", Type = "spell", Value = "驱散魔法", TargetFrames = PARTYMEMBERFRAMES},
	{Key = "CTRL-RightButton", Type = "spell", Value = "驱除疾病", TargetFrames = PARTYMEMBERFRAMES},
	{Key = "SHIFT-RightButton", Type = "assist", TargetFrames = PARTYMEMBERFRAMES, Comment = "在小队头像上按SHIFT+鼠标右键为协助该小队成员"},

	{Key = "MiddleButton", Type = "spell", Value = "恢复", TargetFrames = PARTYMEMBERFRAMES},
	{Key = "ALT-MiddleButton", Type = "spell", Value = "愈合祷言", TargetFrames = PARTYMEMBERFRAMES},
	{Key = "CTRL-MiddleButton", Type = "spell", Value = "真言术：韧", TargetFrames = PARTYMEMBERFRAMES},

	{Key = "LeftButton", Type = "macro", Value = "/cast [help] 快速治疗; [harm] 精神控制;", TargetFrames = "TargetFrame", Comment = "在目标头像上按鼠标左键如果他是友方目标则会为他施放快速治疗法术"},
	{Key = "MiddleButton", Type = "macro", Value = "/cast [help] 恢复; [harm] 驱散魔法;", TargetFrames = "TargetFrame"},
	{Key = "RightButton", Type = "spell", Value = "真言术：盾", TargetFrames = "TargetFrame"},
	{Key = "SHIFT-RightButton", Type = "menu", TargetFrames = "TargetFrame", Comment = "在目标头像上按SHIFT+鼠标右键为调出改目标菜单"},
}

ShortKey.Config[3] = {
	Class = "牧师",
	Talent = 1,
	--Character = "民族英雄",
	--Race = "人类",
	--IsLoad
	Comment = "simonw的牧师暗影天赋专用配置",
	{Key = "H", Type = "spell", Value = "暗影形态", Target = "player", Comment = "暗影形态切换"},
	{Key = "T", Type = "spell", Value = "沉默", Target = "target", Comment = "施放沉默"},

	{Key = "`", Type = "macro", Value = "/castsequence reset=2/target 吸血鬼之触,心灵震爆", Comment = "吸血鬼之触后紧接着心灵震爆"},
	{Key = "1", Type = "macro", Value = "/castsequence reset=1.8/target 心灵震爆,吸血鬼之触", Comment = "心灵震爆后紧接着吸血鬼之触"},
	{Key = "2", Type = "spell", Value = "精神鞭笞", Target = "target", Comment = "施放精神鞭笞"},
	{Key = "3", Type = "spell", Value = "驱散魔法", Target = "target", Comment = "施放驱散魔法"},
	{Key = "4", Type = "macro", Value = "/castsequence reset=2/target 暗言术：痛,噬灵瘟疫,吸血鬼的拥抱", Comment = "DOT全加"},
	{Key = "5", Type = "spell", Value = "暗言术：痛", Target = "target"},
	{Key = "6", Type = "spell", Value = "吸血鬼的拥抱", Target = "target"},

	{Key = "MOUSEWHEELDOWN", Type = "macro", Value = "/castsequence [target=player] reset=30 渐隐术,自利,消散", Comment = "连着施放解除控制技能, 30秒重置"},
}

ShortKey.Config[4] = {
	Class = "牧师",
	Talent = 2,
	--Character = "民族英雄",
	--Race = "人类",
	--IsLoad
	Comment = "simonw的牧师神圣天赋专用配置",

	{Key = "`", Type = "spell", Value = "惩击", Target = "target"},
	{Key = "1", Type = "spell", Value = "心灵震爆", Target = "target"},
	{Key = "2", Type = "spell", Value = "神圣之火", Target = "target"},
	{Key = "3", Type = "spell", Value = "驱散魔法", Target = "target"},
	{Key = "4", Type = "macro", Value = "/castsequence reset=2/target 暗言术：痛,噬灵瘟疫"},
	{Key = "5", Type = "spell", Value = "暗言术：痛", Target = "target"},

	{Key = "MOUSEWHEELDOWN", Type = "spell", Value = "治疗之环"},

	--{Key = "SHIFT-MiddleButton", Type = "spell", Value = "", TargetFrames = PARTYMEMBERFRAMES},
}